var viewModel = {
    cats: ['Tous', 'Non-valides', 'Valides'],

    selectedCat: ko.observable('Tous'),
    currentPageFiche: ko.observable([]),

    selectCat: function(cat){
        this.selectedCat(cat);
    }
};

ko.dependentObservable(function(){
    if(this.ficheLastRequest) this.ficheLastRequest.abort();
    this.ficheLastRequest = $.get('/fiche/index', {cat: this.selectedCat()}, this.currentPageFiche);
    
}, viewModel);

ko.linkObservableToUrl(viewModel.selectedCat, "cat", "Tous");
window.ficheViewModel = viewModel;

ko.applyBindings(viewModel);